﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Metodesa.Master" AutoEventWireup="true" CodeBehind="ListProveedor.aspx.cs" Inherits="Metodesa.Views.Home.ListProveedor" Title="Untitled Page" %>
<%@ OutputCache Location="None" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
  <asp:TextBox ID="searchbox" runat="server" MaxLength="40"></asp:TextBox>
      &nbsp;<asp:Button ID="FindButton" runat="server" Text="Buscar" 
          PostBackUrl="~/Views/Home/ListProveedor.aspx?" CausesValidation="False" 
        onclick="FindButton_Click" /> 
      &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="PrepareAddButton" runat="server" Text="Agregar" 
          PostBackUrl="~/Views/Home/ListProveedor.aspx?a=p" 
        CausesValidation="False" onclick="PrepareAddButton_Click"/>
     <asp:RadioButtonList ID="option" runat="server">
        <asp:ListItem Value="Ci">Cédula o Rif</asp:ListItem>
        <asp:ListItem Value="Name">Nombre</asp:ListItem>
    </asp:RadioButtonList>
    
    <div align="center">
    <asp:Panel ID="ListProveedores" runat="server" Visible="False">
     <p>&nbsp;</p>
   <br />
    </asp:Panel>
    </div>
    <br />
     <asp:Label ID="label" runat="server" Text="Label" Visible="False"></asp:Label>
     <div align="center">
    <asp:Panel ID="PanelEditProveedor" runat="server" Visible="False">
    <p>&nbsp;</p>
       <table style="width:481px;">
            
      
                <tr>
                    <td style="width: 24px">
                        Id</td>
                    <td style="width: 90px">
                        Nombre <font color="red">*</font></td>
                    <td style="width: 90px">
                        Cédula<font color="red">*</font></td>
                    <td style="width: 90px">
                        Dirección</td>
                   
                </tr>
                <tr>
                <td style="width: 24px">
                        <asp:Label ID="teId" runat="server" ReadOnly="True" Width="24px"/>
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="teName" runat="server" Width="87px" MaxLength="75"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldNombre" runat="server" 
                            ErrorMessage="Introduzca un nombre"  ControlToValidate="teName" 
                            Display="Dynamic"></asp:RequiredFieldValidator>
                       
                    </td>
                    
                    <td style="width: 87px">
                        <asp:TextBox ID="teCi" runat="server" Width="87px" MaxLength="12"></asp:TextBox>
                       
                      
                      <asp:RequiredFieldValidator id="RequiredFieldCedula" runat="server" 
                            ErrorMessage="Introduzca una cédula o Rif"  ControlToValidate="teCi" 
                            Display="Dynamic" ></asp:RequiredFieldValidator>
                         
                   
                    </td>
                    <td>
                        <asp:TextBox ID="teAddress" runat="server" Height="49px" TextMode="MultiLine" 
                            Width="181px" MaxLength="75"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                 <td style="width: 60px">
                        Telefono 1 <font color="red">*</font></td>                        
                    <td style="width: 90px">
                        Telefono 2</td>
                    <td style="width: 90px">
                        Telefono 3</td>
                </tr>
                <tr>
                    
                    <td style="width: 87px">
                        <asp:TextBox ID="teTel1" runat="server" Width="87px" MaxLength="28"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldTelefono1" runat="server" 
                            ErrorMessage="Introduzca un Teléfono"  ControlToValidate="teTel1" 
                            Display="Dynamic"></asp:RequiredFieldValidator>
                        <br/>
                        <asp:RegularExpressionValidator ID="validatorTelefono1" runat="server"     
                                    ErrorMessage="Formato Requerido: (0412)222-3333"
                                    ControlToValidate="teTel1" Display="Dynamic"     
                                     />
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="teTel2" runat="server" Width="87px" MaxLength="28"></asp:TextBox>
                        <br/>
                        <asp:RegularExpressionValidator ID="validatorTelefono2" runat="server"     
                                    ErrorMessage="Formato Requerido: (0412)222-3333"
                                    ControlToValidate="teTel2" Display="Dynamic"     
                                   />                       
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="teTel3" runat="server" Width="87px" MaxLength="28"></asp:TextBox> 
                        <br/>
                        <asp:RegularExpressionValidator ID="validatorTelefono3" runat="server"     
                                    ErrorMessage="Formato Requerido: (0412)222-3333"
                                    ControlToValidate="teTel3" Display="Dynamic"     
                                     />                       
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="EditButton" runat="server" 
                            PostBackUrl="~/Views/Home/ListProveedor.aspx?a=e" Text="Modificar" 
                            onclick="EditButton_Click" />
                    </td>
                </tr>
            
           
        </table>
     
  
    </asp:Panel>
    
    
<asp:Panel ID="PanelAddProveedor" runat="server" Visible="False">
    <p>&nbsp;</p>
        <table style="width:481px;">
            
      
                <tr>
                    
                    <td style="width: 90px">
                        Nombre <font color="red">*</font></td>
                    <td style="width: 90px">
                        Cédula <font color="red">*</font></td>
                    <td style="width: 90px">
                        Dirección</td>
                   
                </tr>
                <tr>
                
                    <td style="width: 87px">
                        
                        <asp:TextBox ID="taName" runat="server" Width="87px" MaxLength="75"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldNombre1" runat="server" 
                            ErrorMessage="Introduzca un nombre"  ControlToValidate="taName" 
                            Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                    
                    <td style="width: 87px">
                        <asp:TextBox ID="taCi" runat="server" Width="87px" MaxLength="12"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldCedula2" runat="server" 
                            ErrorMessage="Introduzca una cédula o Rif"  ControlToValidate="taCi" 
                            Display="Dynamic"></asp:RequiredFieldValidator>
                        
                    </td>
                    <td>
                        <asp:TextBox ID="taAddress" runat="server" Height="49px" TextMode="MultiLine" 
                            Width="181px" MaxLength="75"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                 <td style="width: 60px">
                        Telefono 1 <font color="red">*</font></td>                        
                    <td style="width: 90px">
                        Telefono 2</td>
                    <td style="width: 90px">
                        Telefono 3</td>
                </tr>
                <tr>
                    
                    <td style="width: 87px">
                        <asp:TextBox ID="taTel1" runat="server" Width="87px" MaxLength="28"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldTelefono2" runat="server" 
                            ErrorMessage="Introduzca un Telefono"  ControlToValidate="taTel1" 
                            Display="Dynamic"></asp:RequiredFieldValidator>
                        <br/>
                        <asp:RegularExpressionValidator ID="validatorTelefono4" runat="server"     
                                    ErrorMessage="Formato Requerido: (0412)222-3333"
                                    ControlToValidate="taTel1" Display="Dynamic"     
                                     />
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="taTel2" runat="server" Width="87px" MaxLength="28"></asp:TextBox>
                        <br/>
                        <asp:RegularExpressionValidator ID="validatorTelefono5" runat="server"     
                                    ErrorMessage="Formato Requerido: (0412)222-3333"
                                    ControlToValidate="taTel2" Display="Dynamic"     
                                    />                       
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="taTel3" runat="server" Width="87px" MaxLength="28"></asp:TextBox>
                        <br/>
                        <asp:RegularExpressionValidator ID="validatorTelefono6" runat="server"     
                                    ErrorMessage="Formato Requerido: (0412)222-3333"
                                    ControlToValidate="taTel3" Display="Dynamic"     
                                    />                        
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="AddButton" runat="server" 
                            PostBackUrl="~/Views/Home/ListProveedor.aspx?a=a" Text="Agregar" 
                            onclick="AddButton_Click" />
                    </td>
                </tr>
            
           
        </table>
     
  
    </asp:Panel>
    </div>
</asp:Content>
